<?php
/**
 * | @author 韩威兵^life <1877361302@qq.com>
 * +----------------------------------------------------------------------
 * | @copyright 2016 - 2019 HQ
 * +----------------------------------------------------------------------
 * | @version $Id: 2019/4/25 16:18 jiahe_new base.php 韩威兵^life $
 * +----------------------------------------------------------------------
 */

namespace app\common\common\model;

use think\Model;

class  NewBase extends Model
{
    // 设置单独的数据库连接
    protected $connection = [
        'database' => '2222',
    ];

    protected $field = true;


    public function __construct($data=[])
    {
        $this->connection = [
            'database' => config('new_db_name'),
            'prefix'=>''
        ];
        parent::__construct($data);
        //在测试环境需要严格模式
        if(config('app_debug')){
            $this->field = false;
        }

    }
}  